<!DOCTYPE html>

<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>大佬超系统管理平台</title>
    <!--[if lt IE 9]>
    <meta http-equiv="refresh" content="0;ie.html"/>
    <![endif]-->
    <link rel="Shortcut Icon" href="../../static/img/logo.png" type="image/x-icon" />
    <link rel="stylesheet" href="css/amazeui.min.css" />
    <link rel="stylesheet" href="css/im.css" />
    <link rel="stylesheet" href="../../lib/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="../../lib/vxe-table/index.css">
    <link rel="stylesheet" href="../../lib/vxe-table-plugin-element/style.css">
    <link rel="stylesheet" href="../../lib/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="../../static/css/jquery.contextMenu.min.css">
    <link rel="stylesheet" href="../../static/css/animate.css">
    <link rel="stylesheet" href="../../static/css/app-ui.css">
    <link rel="stylesheet" href="../../static/css/style.css">
    <link rel="stylesheet" href="../../lib/element-ui/theme-chalk/index.css">
    <link rel="stylesheet" href="../../static/css/skins.css">
    <script type="text/javascript" src="../../lib/vue/vue.js"></script>
    <script type="text/javascript" src="../../static/js/jquery.min.js"></script>
    <script type="text/javascript" src="../../lib/bootstrap/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="../../lib/plugins/metisMenu/jquery.metisMenu.js"></script>
    <script type="text/javascript" src="../../lib/plugins/slimscroll/jquery.slimscroll.min.js"></script>
    <script type="text/javascript" src="../../lib/plugins/blockUI/jquery.blockUI.js"></script>
    <script type="text/javascript" src="../../static/js/jquery.contextMenu.min.js"></script>
    <script type="text/javascript" src="../../lib/layer/layer.min.js"></script>
    <script type="text/javascript" src="../../static/js/app-ui.js"></script>
    <script type="text/javascript" src="../../static/js/common.js"></script>
    <script type="text/javascript" src="../../lib/element-ui/index-change.js"></script>
    <script type="text/javascript" src="../../lib/vxe-table-plugin-element/index.js"></script>
    <script type="text/javascript" src="../../static/js/index.js"></script>
    <script type="text/javascript" src="../../lib/xe-utils/xe-utils.js"></script>
    <script type="text/javascript" src="../../lib/xe-ajax/xe-ajax.js"></script>
    <script src="../../static/js/tool.js"></script>
    <script type="text/javascript" src="../../static/js/webApi.js"></script>
    <script type="text/javascript" src="../../lib/vxe-table/index.js"></script>

    <script defer="true">
    </script>
    <style>
        .el-badge__content.is-fixed {
            top: 28px;
            right: 20px;
        }

        input::-webkit-input-placeholder {
            color: #000;
        }

        input::-moz-input-placeholder {
            color: #000;
        }

        input::-ms-input-placeholder {
            color: #000;
        }

        /*左侧菜单换行后文字对齐处理 开始*/
        #side-menu li i {
            width: 18px;
            float: left;
            line-height: 21px;
        }

        .nav-second-level li i {
            line-height: 18px !important;
        }

        .nav>li>a {
            overflow: auto;
        }

        .nav>li>a span.nav-label {
            float: left;
            width: calc(100% - 36px);
        }

        .nav-second-level li a span.nav-label {
            width: calc(100% - 32px);
        }

        .nav>li>a.menuItem span.nav-label {
            width: calc(100% - 27px);
        }

        /*左侧菜单换行后文字对齐处理 结束*/

        .layui-layer-title {
            background-color: #023062;
        }

        .nav-color div>a,
        #time-box {
            color: #f9e6e4 !important;
            margin-top: 12px;
        }

        .el-form-item {
            margin-bottom: 0px;
        }

        .defaultInfo {
            display: none;
        }

        .closeInfoHouse {
            display: none;
        }

        .lookHouseInfo {
            display: block;
        }

        .closePigInfo:hover {
            background-color: gainsboro;
        }

        .navbar-header {
            width: 50%;
            height: 94%;
            margin-top: 5px;
        }

        [v-cloak] {
            display: none;
        }

        #unRead {
            position: absolute;
            /* margin-top: 11px; */
            margin-left: 6px;
            border-radius: 100%;
            background-color: #fc6678;
            font-size: 0.25rem;
            color: #fff;
            line-height: 1;
            vertical-align: 10px;
            padding: 5px 5px;
        }

        .el-table {
            background: #E0E7F4;
        }

        .context-menu-item {
            font-size: 12px;
        }
    </style>
</head>

<body class="changeMax fixed-sidebar full-height-layout skin-green theme-light gray-bg skin-del skin-min"
    style="overflow: hidden">
    <div id="wrapper" v-cloak>
        <!--左侧导航开始-->
        <nav class="navbar-default navbar-static-side" role="navigation">
            <div class="nav-close">
                <i class="fa fa-times-circle"></i>
            </div>
            <div class="sidebar-collapse">
                <ul class="nav" id="side-menu">
                    <a href="javascript:void(0);">
                        <li class="logo">
                            <div class="logo-lg">
                                <!-- 左侧loge -->
                                <img src="../../static/img/logo3.png" title="大佬超科技" alt="大佬超科技"
                                    style="height:65px;" />
                                <div></div>
                            </div>
                            <!-- <span id="use-tip" style="font-size: 12px;">{{user.tipMessage}}</span> -->
                        </li>
                    </a>
                    <li>
                        <div class="user-panel">
                            <a class="menuItem" href="javascript:void(0);" data-index="999">
                                <div class="hide" text="个人中心"></div>
                                <div class="pull-left image">
                                    <img :src="user.userLeftImg" class="img-circle" alt="User Image">
                                </div>
                            </a>
                            <div class="pull-left info">
                                <p>{{user.userId}}</p>
                                <div>
                                    <i class="fa fa-circle text-success" style="cursor: pointer;">
                                        <span style="color: #000;margin-left: 5px;">在线</span>
                                    </i>
                                </div>
                                <div style="margin-left:60px;">
                                    <i class="fa fa-sign-out text-danger" style="cursor: pointer;" @click="loginOut()">
                                        <span style="color: #000;margin-left: 5px;">退出</span>
                                    </i>
                                </div>
                                <!-- <a href="javascript:void(0);"><i class="fa fa-circle text-success"></i></a>
                                <a style="padding-left:5px;" @click="loginOut()"><i
                                        class="fa fa-sign-out text-danger"></i> 退出</a> -->
                            </div>
                        </div>
                    </li>
                    <!-- <li class="divider"></li> -->
                </ul>
            </div>
        </nav>
        <!--左侧导航结束-->
        <!--右侧部分开始-->
        <div id="page-wrapper" class="gray-bg dashbard-1">
            <div class="row border-bottom">
                <nav class="navbar navbar-static-top nav-color" role="navigation"
                    style="margin-bottom: 0;height: 60px;">
                    <!-- <div class="navbar-header">
                        <a class="navbar-minimalize minimalize-styl-2" style="color:#FFF;" href="javascript:void(0);"
                            title="收起菜单">
                            <i class="fa fa-bars"></i>
                        </a>
                        <a
                            style="font-family:@宋体; font-weight:bold; margin-left: 100px; height: 100px; color: white; font-size: 28px;">|
                            {{platform}}</a>
                    </div> -->
                    <!-- 中间文字 -->
                    <ul class="nav navbar-top-links navbar-right welcome-message nav-color"
                        style="display: flex;align-items: center;">
                        <!-- <li style="position: relative;opacity: 0.8;padding-right:15px">
                            <div style="color: #fff;">
                                <el-input v-model="getMenu" placeholder="请输入菜单名称" clearable>
                                    <el-button slot="append" icon="el-icon-search" style="color: #000000;"
                                        @click="queryList"></el-button>
                                </el-input>
                            </div>
                        </li> -->
                        <!-- <li style="position: relative;opacity: 0.8;">
                            <div style="color: #fff;">
                                <span id="unRead" v-show="this.messageAll.length !=0"></span>
                                <div><i class="fa fa-bell fa-lg" style="cursor: pointer;" @click="StartModal"></i></div>
                            </div>
                        </li> -->
                        <li class="dropdown user-menu">
                            <a class="dropdown-toggle" data-hover="dropdown">
                                <img :src="user.userHeadImg" class="user-image">
                                <span class="hidden-xs"
                                    v-cloak>{{user.userId}}-{{user.orgName}}-{{user.userRole}}</span>
                            </a>
                            <ul class="dropdown-menu">
                                <li class="mt5">
                                    <a class="menuItem" @click="switchRole()" data-index="999" style="font-size: 11px;">
                                        <i class="fa fa-user"></i> 切换角色</a>
                                </li>
                                <li>
                                    <a @click="modifyPwd()" style="font-size: 11px;">
                                        <i class="fa fa-key"></i>修改密码</a>
                                </li>
                                <li>
                                    <a @click="switchSkin()" style="font-size: 11px;">
                                        <i class="fa fa-dashboard"></i>切换主题</a>
                                </li>
                                <li>
                                    <a @click="changeFont()" style="font-size: 11px;">
                                        <i class="fa fa-font"></i>切换字体</a>
                                </li>
                                <li class="divider"></li>
                                <li>
                                    <a @click="loginOut()" style="font-size: 11px;">
                                        <i class="fa fa-sign-out"></i>退出登录</a>
                                </li>
                            </ul>
                        </li>
                    </ul>
                </nav>
            </div>
            <div class="row content-tabs" id="widthAll">
                <button class="roll-nav roll-left tabLeft" id="widthLeft">
                    <i class="fa fa-backward"></i>
                </button>
                <nav class="page-tabs menuTabs">
                    <div class="page-tabs-content" id="widthCenter">
                        <a class="active menuTab" data-id="/system/home">首页</a>
                    </div>
                </nav>
                <button class="roll-nav roll-right tabRight" id="widthRight1">
                    <i class="fa fa-forward"></i>
                </button>
                <div class="btn-group roll-nav roll-right" id="widthRight2">
                    <button class="dropdown" data-toggle="dropdown"
                        style="height: 100%;vertical-align: baseline;">关闭操作<span class="caret"></span></button>
                    <ul role="menu" class="dropdown-menu dropdown-menu-right">
                        <li><a @click="tabCloseAll();" style="font-size: 11px;">关闭全部选项卡</a></li>
                        <li><a @click="tabCloseOther();" style="font-size: 11px;">关闭其他选项卡</a></li>
                    </ul>
                </div>
                <a class="roll-nav roll-right tabReload" id="widthRight3"><i class="fa fa-refresh"></i> 刷新</a>
            </div>
            <div class="row mainContent" id="content-main">
                <iframe class="app_iframe" id="iframe0" name="iframe0" width="100%" height="100%" data-id="/system/home"
                    src="sys-home3.html" frameborder="0" seamless></iframe>
                <!--        <iframe class="app_iframe" id="iframe0" name="iframe0" width="100%" height="100%" data-id="/system/home"
                    src="../tdgj/tdgjdemo.html" frameborder="0" seamless></iframe>
                    -->
            </div>

        </div>
        <!--右侧部分结束-->
        <!-- 角色切换 -->
        <el-dialog title="角色切换" :visible.sync="showImModal" width="40%" :before-close="handleClose">
            <el-form label-width="80px" size="mini">
                <el-form-item label="角色查询">
                    <el-input v-model="userData" placeholder="请输入角色名" style="width: 300px;"></el-input>
                    <el-button type="primary" icon="el-icon-search" @click="selectRole()">查询</el-button>
                </el-form-item>
                <el-form-item v-for="item in roleChange">
                    <a @click="changeRole(item)" v-cloak>{{item.roleName}}</a>
                </el-form-item>
            </el-form>
            <span slot="footer" class="dialog-footer">
                <el-button @click="showImModal = false"
                    style="color: grey;background-color: transparent;border-color: grey;">
                    关 闭</el-button>
            </span>
        </el-dialog>
        <vxe-modal v-model="messageModal" width="60%" height="50%" destroy-on-close @close="closeMessage" title="公告通知">
            <vxe-grid border stripe ref="xTree" resizable show-overflow highlight-current-row="true" keep-source
                height="99%" size="mini" :data="messageAll">
                <!-- <vxe-table-column type="checkbox" width="60" headerAlign="center" align="center"></vxe-table-column> -->
                <vxe-table-column field="id" title="公告编码" headerAlign="center" align="center">
                </vxe-table-column>
                <vxe-table-column field="title" title="公告标题" headerAlign="center" align="center">
                </vxe-table-column>
                <vxe-table-column field="createUser" title="创建人" headerAlign="center" align="center">
                </vxe-table-column>
                <vxe-table-column field="createTime" title="创建日期" headerAlign="center" align="center"
                    :formatter="formatDate">
                </vxe-table-column>
                <vxe-table-column field="createTime" title="操作" headerAlign="center" align="center">
                    <template v-slot="{ row }">
                        <template v-if="row.type=='1'">
                            <a @click="openDetial(row)">查看详情</a>
                        </template>
                        <template v-else>
                            <a @click="linkDetial(row)">查看详情</a>
                            </vxe-button>
                        </template>
                    </template>
                </vxe-table-column>
            </vxe-grid>
        </vxe-modal>
        <vxe-modal v-model="messageDetial" width="50%" height="40%" destroy-on-close @close="closeDetial" title="公告详情">
            <template #default>
                <el-row>
                    <el-col :span="24" align="center">
                        <h1>{{messageRow.title}}</h1>
                    </el-col>
                    <el-col :span="24" align="center">
                        <p>创建人：{{messageRow.createUser}}&nbsp;&nbsp;日期：{{messageRow.createTime}}</p>
                    </el-col>
                    <p>&nbsp;&nbsp;{{messageRow.content}}</p>
                </el-row>
            </template>
        </vxe-modal>

        <vxe-modal ref="xModal" v-model="showEdit" :title="selectRow" width="1000" height="600" :loading="submitLoading"
            resize destroy-on-close>
            <el-row style="width: 100%;">
                <el-col :span="24">
                    <vxe-grid border stripe ref="xTree1" resizable show-overflow highlight-current-row="true"
                        keep-source height="500" size="mini" row-id="menuCode"
                        :edit-config="{trigger:'click', mode:'row'}" :data="tableData">
                        <vxe-table-column field="parentMenuName" title="父级菜单" width="580px" header-align="center"
                            align="center">
                        </vxe-table-column>
                        <vxe-table-column field="menuName" title="菜单名称" width="380px" header-align="center"
                            align="center">
                            <template v-slot="{ row }">
                                <el-button type="text" @click="openTab(row.menuUrl,row.menuName)">{{row.menuName}}
                                </el-button>
                            </template>
                        </vxe-table-column>
                    </vxe-grid>
                </el-col>
            </el-row>
        </vxe-modal>
    </div>

    <!-- 全局js -->

    <script type="text/javascript">

        function fullScreen (domid) {
            var element = document.getElementById(domid);
            if (element.requestFullscreen) {
                element.requestFullscreen();
            } else if (element.msRequestFullscreen) {
                element.msRequestFullscreen();
            } else if (element.mozRequestFullScreen) {
                element.mozRequestFullScreen();
            } else if (element.webkitRequestFullscreen) {
                element.webkitRequestFullscreen();
            }
        }

        function isFullscreen () {
            return document.fullscreenElement ||
                document.msFullscreenElement ||
                document.mozFullScreenElement ||
                document.webkitFullscreenElement || false;
        }

        //退出全屏
        function exitFullscreen () {
            if (document.exitFullscreen) {
                document.exitFullscreen();
            } else if (document.msExitFullscreen) {
                document.msExitFullscreen();
            } else if (document.mozCancelFullScreen) {
                document.mozCancelFullScreen();
            } else if (document.webkitExitFullscreen) {
                document.webkitExitFullscreen();
            }
        }

        function iframeTop () {
            return $("#iframe0").get(0).getBoundingClientRect().top;
        }
        function iframeLeft () {
            return $("#iframe0").get(0).getBoundingClientRect().left;
        }

        var ctx = '';
        var skins = ["skin-red", "skin-blue", "skin-green", "skin-purple", "skin-yellow"];
        // 主题样式列表
        var themes = ["theme-dark", "theme-light"];
        var vm = new Vue({
            el: '#wrapper',
            data: {
                formData: {
                    roleName: ''
                },
                tableData: [],
                submitLoading: false,
                selectRow: '搜索结果',
                showEdit: false,
                messageRow: {},
                messageDetial: false,
                messageAll: [],
                messageModal: false,
                houseTabActive: 'order',
                showImModal: false,
                getMenu: "",
                roleChange: [],
                user: {
                    systemName: '',
                    systemVersion: '',
                    companyAbbreviation: '',
                    companyName: '',
                    companyPhone: '',
                    userName: '',
                    orgCode: '',
                    orgName: '',
                    setCode: '',
                    setName: '',
                    userId: '',
                    userRole: '',
                    yr: '',
                    tipMessage: '',
                    // userHeadImg: '../../static/img/name.png',
                    sysImg: '../../static/img/title.png',
                    userLeftImg: '../../static/img/logo.png',
                    // 右侧图标
                    userHeadImg: '../../static/img/logo.png'
                },
                fiData: {
                    yr: '',
                    setCode: '',
                    setName: ''
                },
                userInfoData: { //当前登录人信息
                    userId: "", //当前登录用户账号（userCode）
                    userAvatar: "", //用户头像
                    userName: "" //用户名
                },
                userData: "",
                platform: '大佬超系统管理平台',
                type: 1
            },
            filters: {
                //局部过滤器
                formatTime: function (date) {
                    var d = new Date(date);
                    var month = (d.getMonth() + 1) < 10 ? '0' + (d.getMonth() + 1) : (d.getMonth() + 1);
                    var day = d.getDate() < 10 ? '0' + d.getDate() : d.getDate();
                    var hours = d.getHours() < 10 ? '0' + d.getHours() : d.getHours();
                    var min = d.getMinutes() < 10 ? '0' + d.getMinutes() : d.getMinutes();
                    var sec = d.getSeconds() < 10 ? '0' + d.getSeconds() : d.getSeconds();
                    var times = "";
                    if (vm.isToday(d.getFullYear() + '-' + month + '-' + day)) {
                        times = hours + ':' + min + ':' + sec;
                    } else {
                        times = d.getFullYear() + '/' + month + '/' + day;
                    }
                    return times;
                },
                formatDate: function (date) {
                    var d = new Date(date);
                    var month = (d.getMonth() + 1) < 10 ? '0' + (d.getMonth() + 1) : (d.getMonth() + 1);
                    var day = d.getDate() < 10 ? '0' + d.getDate() : d.getDate();
                    var hours = d.getHours() < 10 ? '0' + d.getHours() : d.getHours();
                    var min = d.getMinutes() < 10 ? '0' + d.getMinutes() : d.getMinutes();
                    var sec = d.getSeconds() < 10 ? '0' + d.getSeconds() : d.getSeconds();
                    var times = d.getFullYear() + '-' + month + '-' + day + " " + hours + ':' + min + ':' + sec;
                    return times;
                }
            },
            created () {
                var that = this;
                // this.platform=localStorage.getItem('platform',this.platform)
                // document.title = this.platform;
                this.type = URLUtils.getParam('type');
                if (this.type && this.type == 1) {
                    this.platform = '大佬超系统管理平台'
                }
                else if (this.type && this.type == 2) {
                    this.platform = '导览解说管理平台'
                }
                document.title = this.platform;
                localStorage.setItem('platform', this.platform)
                this.loginCheck();
                this.getUser();
                this.getMessage()
                window.setInterval(() => { //每隔5min自动请求一次方法，更新公告
                    this.getMessage()
                }, 1000 * 60 * 5)
            },
            mounted () { },
            methods: {
                setList (item) {
                    // console.log(item)
                    let list = item.split("/");
                    let str = '';
                    for (let i = 0; i < list.length - 1; i++) {
                        str = str + list[i] + '/';
                    }
                    return str;
                },
                setFullPath (num) {
                    // console.log(num);
                    return num + '1';
                },
                linkDetial (row) {
                    //console.log(row)
                    this.messageModal = false;
                    let str = row.menuPath.split("?", 1);
                    let path = str[0] + "?menu_id=" + row.menuId;
                    Tool.openTabEvents(path, row.menuName, {}, '../sys/sys-index.html' + '?type=' + this.type)
                },
                //详情
                openDetial (row) {
                    this.messageRow = row
                    this.messageDetial = true
                },
                closeDetial () {
                    this.messageDetial = false
                },
                //获取消息
                getMessage () {
                    let that = this
                    webApi('/notice/NoticeListHome', 'post', {}, function (res) {
                        if (res.code == 200) {
                            if (res.data) {
                                that.messageAll = res.data
                            } else {
                                that.messageAll = []
                            }
                        } else {
                            that.messageAll = []
                            that.$message({
                                type: 'error',
                                message: res.msg,
                                center: true
                            })
                        }
                    }, function () {
                        that.$message({
                            type: 'error',
                            message: "消息请求出错",
                            center: true
                        })
                    }, false)
                },
                formatDate ({
                    cellValue
                }) {
                    return XEUtils.toDateString(cellValue, 'yyyy-MM-dd')
                },
                //关闭message
                closeMessage () {
                    this.messageModal = false
                },
                //打开消息框
                StartModal () {
                    if (this.messageAll.length != 0) {
                        this.messageModal = true
                        this.getMessage();
                    } else {
                        this.$message({
                            type: 'warning',
                            message: '暂无公告信息',
                            center: true
                        })
                    }

                },
                queryList () {
                    let that = this;
                    let loading = that.$loading({
                        lock: true,
                        // spinner: 'el-icon-loading',
                        target: '#wrapper',
                        text: 'Loading',
                        spinner: 'el-icon-loading',
                        background: 'rgba(0, 0, 0, 0.7)',
                        fullscreen: false
                    })
                    if (that.getMenu != '') {
                        webApi('/menu/getUserMenu', 'post', {
                            keyword: that.getMenu
                        }, function (data) {
                            that.tableData = data.data;
                        }, function (res) {
                            this.$message({
                                type: 'error',
                                message: res.msg,
                                center: true
                            })
                        }, false)
                        loading.close()
                        that.getMenu = '';
                        that.showEdit = true;
                    } else {
                        this.$message({
                            type: 'warning',
                            message: '请输入菜单名称',
                            center: true
                        })
                        loading.close()
                    }
                },
                openTab (item, name) {
                    //console.log(item, name)
                    let that = this;
                    that.showEdit = false;
                    Tool.openTabEvents(item, name, {}, '../sys/sys-index.html' + '?type=' + this.type);
                },
                //关闭面板
                handleClose () {
                    this.showImModal = false
                },
                //获取角色
                switchRole () {
                    let that = this
                    webApi('/users/userRoleTableList', 'post', {
                        userId: that.user.userName,
                    }, function (data) {
                        that.roleChange = data.data.rows; //获取到的值存入roleChange
                    }, function () { }, false)
                    this.showImModal = true
                },
                //查询角色
                selectRole () {
                    let arr = [] //定义一个空数组
                    this.roleChange.forEach((item) => {
                        if (this.userData == item.roleName || this.userData == item.roleName.match(this
                            .userData)) {
                            arr.push(item)
                        }
                    })
                    console.log(arr)
                    this.roleChange = arr
                },
                //换角色
                changeRole (params) {
                    let that = this
                    console.log(params)
                    createUser: null
                    departId: "510000"
                    departName: "四川"
                    id: "16097"
                    roleId: "1000"
                    roleName: "超级管理员(四川)"
                    roleType: "默认角色"
                    userId: "admin"
                    userName: "系统管理员"
                    webApi('/users/UserRoleChange', 'post', params, function (data) {
                        if (data.code == 200) {
                            // clearCookie();
                            setCookie("token", data.data);
                            //登录成功选择会计年度和授权的账套
                            window.top.location = encodeURI("sys-index.html?v=" + Math.random() + '?type=' + this.type);
                            //this.loginFlag = true;
                        } else {
                            that.$message({
                                showClose: true,
                                message: data.msg,
                                type: 'error',
                                duration: 10000,
                                center: true
                            });
                        }
                    }, function () { })
                },
                loginCheck () {
                    let that = this
                    webApi('/user/loginCheck', 'get', {}, function (data) {
                        if (data.code == 200) {
                            var skin = '' == storage.get('skin') ? '' == data.data.user_SKIN ?
                                'skin-purple|theme-dark' : data.data.user_SKIN : storage.get('skin');
                            (skin != 'null' && skin != '' && skin != null) ? $("body").removeClass('skin-red')
                                .addClass(skin.split('|')[
                                    0]) : '';
                            (skin != 'null' && skin != '' && skin != null) ? $("body").removeClass(
                                'theme-light').addClass(skin.split(
                                    '|')[1]) : '';
                            storage.set('skin', skin);
                            // console.info(data.data);
                            that.user.userId = data.data.userName;
                            that.user.orgCode = data.data.departId;
                            that.user.orgName = data.data.departName;
                            that.user.userName = data.data.userId;
                            that.user.userRole = data.data.roleName;
                            //兼容低代码平台设置token值
                            var token = getCookie("token");
                            var tokenStr = {
                                value: token,
                                expire: 7 * 24 * 60 * 60 * 1000
                            };
                            localStorage.setItem("pro__Access-Token", JSON.stringify(tokenStr));
                        } else {
                            window.location.href = 'sys-login.html' + '?type=' + that.type;
                        }
                    }, function () { })
                },
                getUser () {
                    var object = this;
                    var signInputParms = {
                        V_TOKEN: localStorage.getItem("token")
                    };
                    webApi("/users/getUser", "post", signInputParms, function (data) {
                        if (data.code == 200) {
                            var data = data.data;
                            Tool.userInfo = data;
                            object.userInfoData.userId = data.user_ID;
                            object.userInfoData.userName = data.user_NAME;
                            if (data.userAvatar) {
                                object.userInfoData.userAvatar = data.userAvatar;
                            }
                        } else {
                            window.location.href = 'sys-login.html' + '?type=' + object.type;
                        }
                    }, null);
                },
                modifyPwd: function () {
                    layer.open({
                        type: 2,
                        shadeClose: false,
                        title: "修改密码",
                        area: ["530px", "320px"],
                        content: ["sys-modify-pwd.html", 'no']
                    });
                },
                switchSkin: function () {
                    layer.open({
                        type: 2,
                        shadeClose: true,
                        title: "切换主题",
                        area: ["530px", "386px"],
                        content: ["sys-modify-skin.html", 'no']
                    });
                },
                changeFont: function () {
                    layer.open({
                        type: 2,
                        shadeClose: true,
                        title: "切换字体大小",
                        area: ["300px", "150px"],
                        content: ["sys-modify-font.html", 'no']
                    });
                },
                loginOut: function () {
                    let that = this;
                    layer.confirm('确定要退出吗？', {
                        icon: 3,
                        btn: ['确认', '取消'] //按钮
                    }, function () {
                        clearCookie("token");
                        if (that.type == 1) {
                            window.location.href = '../../volunteerLogin.html' + '?type=' + that.type;
                        } else if (that.type == 2) {
                            window.location.href = '../../navigationLogin.html' + '?type=' + that.type;
                        }
                    });
                },
                tabCloseAll: function () {
                    $('.page-tabs-content').children("[data-id]").not(":first").each(function () {
                        $('.app_iframe[data-id="' + $(this).data('id') + '"]').remove();
                        $(this).remove();
                    });
                    $('.page-tabs-content').children("[data-id]:first").each(function () {
                        $('.app_iframe[data-id="' + $(this).data('id') + '"]').show();
                        $(this).addClass("active");
                    });
                    $('.page-tabs-content').css("margin-left", "0");
                },
                tabCloseOther: function () {
                    //setActiveTab(this);
                    $('.page-tabs-content').children("[data-id]").not(":first").not(".active").each(function () {
                        $('.app_iframe[data-id="' + $(this).data('id') + '"]').remove();
                        $(this).remove();
                    });
                    $('.page-tabs-content').css("margin-left", "0");
                },
            },
        });
    </script>
</body>

</html>